/**
 * 浏览器工作流 - 选项页面样式
 */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: #333;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  background: white;
  min-height: 100vh;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

/* 头部样式 */
.header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 30px 40px;
  text-align: center;
}

.logo {
  width: 64px;
  height: 64px;
  margin-bottom: 15px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2);
}

.header h1 {
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 8px;
}

.subtitle {
  font-size: 16px;
  opacity: 0.9;
  font-weight: 300;
}

/* 主要内容 */
.main-content {
  padding: 40px;
}

/* 设置区域 */
.settings-section {
  margin-bottom: 40px;
  background: #f8f9fa;
  border-radius: 12px;
  padding: 25px;
  border-left: 4px solid #667eea;
}

.settings-section h2 {
  font-size: 20px;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.settings-section h2::before {
  content: '';
  width: 4px;
  height: 20px;
  background: #667eea;
  border-radius: 2px;
}

/* 设置项 */
.setting-item {
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid #e9ecef;
}

.setting-item:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

/* 子设置项样式 */
.setting-item.sub-setting {
  margin-top: 10px;
  margin-bottom: 15px;
  padding: 15px 20px;
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  border-bottom: 1px solid #e9ecef;
}

.setting-item.sub-setting .setting-label {
  font-size: 14px;
  color: #495057;
  margin-bottom: 6px;
}

.setting-item.sub-setting .setting-description {
  font-size: 13px;
  margin-left: 26px;
  color: #6c757d;
}

.setting-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 500;
  color: #2c3e50;
  cursor: pointer;
  margin-bottom: 8px;
}

.setting-label input[type="checkbox"] {
  display: none;
}

.checkmark {
  width: 20px;
  height: 20px;
  border: 2px solid #ddd;
  border-radius: 4px;
  position: relative;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.setting-label input[type="checkbox"]:checked + .checkmark {
  background: #667eea;
  border-color: #667eea;
}

.setting-label input[type="checkbox"]:checked + .checkmark::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 12px;
  font-weight: bold;
}

.setting-description {
  font-size: 14px;
  color: #6c757d;
  margin-left: 30px;
  line-height: 1.4;
}

/* 输入框样式 */
label[for] {
  display: block;
  font-size: 16px;
  font-weight: 500;
  color: #2c3e50;
  margin-bottom: 8px;
}

input[type="number"] {
  width: 100px;
  padding: 8px 12px;
  border: 2px solid #e9ecef;
  border-radius: 6px;
  font-size: 14px;
  transition: border-color 0.3s ease;
}

input[type="number"]:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* 关于信息 */
.about-info {
  background: white;
  padding: 20px;
  border-radius: 8px;
  border: 1px solid #e9ecef;
}

.about-info p {
  margin-bottom: 10px;
  font-size: 14px;
}

.about-info strong {
  color: #2c3e50;
  font-weight: 600;
}

.status-ready {
  color: #28a745;
  font-weight: 600;
}

.status-recording {
  color: #dc3545;
  font-weight: 600;
}

.status-error {
  color: #dc3545;
  font-weight: 600;
}

/* 使用说明样式 */
.usage-guide {
  background: white;
  padding: 25px;
  border-radius: 8px;
  border: 1px solid #e9ecef;
}

.usage-guide h3 {
  font-size: 18px;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid #667eea;
}

.usage-steps {
  counter-reset: step-counter;
  list-style: none;
  margin-bottom: 30px;
}

.usage-steps li {
  counter-increment: step-counter;
  margin-bottom: 20px;
  padding-left: 40px;
  position: relative;
}

.usage-steps li::before {
  content: counter(step-counter);
  position: absolute;
  left: 0;
  top: 0;
  width: 24px;
  height: 24px;
  background: #667eea;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
}

.usage-steps li strong {
  color: #2c3e50;
  font-weight: 600;
  display: block;
  margin-bottom: 5px;
}

.usage-steps li p {
  color: #6c757d;
  font-size: 14px;
  line-height: 1.5;
  margin: 0;
}

.usage-notes {
  list-style: none;
}

.usage-notes li {
  margin-bottom: 10px;
  padding-left: 20px;
  position: relative;
  font-size: 14px;
  color: #6c757d;
  line-height: 1.5;
}

.usage-notes li::before {
  content: '⚠️';
  position: absolute;
  left: 0;
  top: 0;
}

/* 操作按钮 */
.actions {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin-top: 40px;
  padding: 30px;
  background: #f8f9fa;
  border-radius: 12px;
}

.primary-btn, .secondary-btn {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.primary-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.primary-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(102, 126, 234, 0.5);
}

.secondary-btn {
  background: #6c757d;
  color: white;
}

.secondary-btn:hover {
  background: #5a6268;
  transform: translateY(-1px);
}

/* 消息提示 */
.message {
  margin-top: 20px;
  padding: 15px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  animation: slideIn 0.3s ease;
}

.message.success {
  background: #d4edda;
  color: #155724;
  border-left: 4px solid #28a745;
}

.message.error {
  background: #f8d7da;
  color: #721c24;
  border-left: 4px solid #dc3545;
}

.message.warning {
  background: #fff3cd;
  color: #856404;
  border-left: 4px solid #ffc107;
}

.message.info {
  background: #d1ecf1;
  color: #0c5460;
  border-left: 4px solid #17a2b8;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 响应式设计 */
@media (max-width: 768px) {
  .main-content {
    padding: 20px;
  }
  
  .settings-section {
    padding: 20px;
  }
  
  .actions {
    flex-direction: column;
    align-items: center;
  }
  
  .primary-btn, .secondary-btn {
    width: 100%;
    max-width: 200px;
  }
}

/* 颜色选择器样式 */
.color-picker-container {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}

#highlight-color {
  width: 40px;
  height: 32px;
  border: 2px solid #ddd;
  border-radius: 6px;
  cursor: pointer;
  background: none;
  outline: none;
  transition: border-color 0.2s ease;
}

#highlight-color:hover {
  border-color: #667eea;
}

#highlight-color:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.color-preview {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px #ddd, 0 2px 4px rgba(0,0,0,0.1);
  background-color: #ff6b6b;
  transition: transform 0.2s ease;
}

.color-preview:hover {
  transform: scale(1.1);
}

.color-text {
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 14px;
  color: #666;
  background: #f8f9fa;
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid #e9ecef;
  min-width: 70px;
  text-align: center;
} 